<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateRestaurantTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreateRestaurantLabel_idRestaurant}" for="idRestaurant" />
                    <h:inputText id="idRestaurant" value="#{restaurantController.selected.idRestaurant}" title="#{bundle.CreateRestaurantTitle_idRestaurant}" required="true" requiredMessage="#{bundle.CreateRestaurantRequiredMessage_idRestaurant}"/>
                    <h:outputLabel value="#{bundle.CreateRestaurantLabel_nom}" for="nom" />
                    <h:inputText id="nom" value="#{restaurantController.selected.nom}" title="#{bundle.CreateRestaurantTitle_nom}" required="true" requiredMessage="#{bundle.CreateRestaurantRequiredMessage_nom}"/>
                    <h:outputLabel value="#{bundle.CreateRestaurantLabel_adresse}" for="adresse" />
                    <h:inputText id="adresse" value="#{restaurantController.selected.adresse}" title="#{bundle.CreateRestaurantTitle_adresse}" required="true" requiredMessage="#{bundle.CreateRestaurantRequiredMessage_adresse}"/>
                    <h:outputLabel value="#{bundle.CreateRestaurantLabel_telephone}" for="telephone" />
                    <h:inputText id="telephone" value="#{restaurantController.selected.telephone}" title="#{bundle.CreateRestaurantTitle_telephone}" required="true" requiredMessage="#{bundle.CreateRestaurantRequiredMessage_telephone}"/>
                    <h:outputLabel value="#{bundle.CreateRestaurantLabel_fax}" for="fax" />
                    <h:inputText id="fax" value="#{restaurantController.selected.fax}" title="#{bundle.CreateRestaurantTitle_fax}" required="true" requiredMessage="#{bundle.CreateRestaurantRequiredMessage_fax}"/>
                    <h:outputLabel value="#{bundle.CreateRestaurantLabel_codePostal}" for="codePostal" />
                    <h:inputText id="codePostal" value="#{restaurantController.selected.codePostal}" title="#{bundle.CreateRestaurantTitle_codePostal}" required="true" requiredMessage="#{bundle.CreateRestaurantRequiredMessage_codePostal}"/>
                    <h:outputLabel value="#{bundle.CreateRestaurantLabel_ville}" for="ville" />
                    <h:inputText id="ville" value="#{restaurantController.selected.ville}" title="#{bundle.CreateRestaurantTitle_ville}" required="true" requiredMessage="#{bundle.CreateRestaurantRequiredMessage_ville}"/>
                    <h:outputLabel value="#{bundle.CreateRestaurantLabel_idMb}" for="idMb" />
                    <h:selectOneMenu id="idMb" value="#{restaurantController.selected.idMb}" title="#{bundle.CreateRestaurantTitle_idMb}" required="true" requiredMessage="#{bundle.CreateRestaurantRequiredMessage_idMb}">
                        <f:selectItems value="#{marqueBlancheController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{restaurantController.create}" value="#{bundle.CreateRestaurantSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{restaurantController.prepareList}" value="#{bundle.CreateRestaurantShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.CreateRestaurantIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
